package com.telit.firecommand.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.telit.firecommand.entity.CommAlarmPromptJob;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface CommAlarmPromptJobDao extends BaseMapper<CommAlarmPromptJob> {
    int deleteByPrimaryKey(Long id);

    int insert(CommAlarmPromptJob record);

    int insertSelective(CommAlarmPromptJob record);

    CommAlarmPromptJob selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CommAlarmPromptJob record);

    int updateByPrimaryKey(CommAlarmPromptJob record);

    List<CommAlarmPromptJob> selectAllPromptFire();

    @Update("update   comm_alarm_prompt_job  set status=2  where fire_id=#{fireId} ")
    void alarm(@Param("fireId") String fireId );

    List<CommAlarmPromptJob>selectAllPrompt();

    @Delete("delete from comm_alarm_prompt_job ")
    void deleteAll();

    @Update("update   comm_alarm_prompt_job  set shi_is_remind=1  where fire_id=#{fireId} ")
    void updateShiByFireId(@Param("fireId") String fireId);

    @Update("update   comm_alarm_prompt_job  set shen_is_remind=1  where fire_id=#{fireId} ")
    void updateShenByFireId(@Param("fireId") String fireId);
}